﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp_MvvmPatten.Model;
 
public class CalculateDataModel : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler? PropertyChanged;


    private double _value1;
    public double Value1
    {
        get { return _value1; }
        set
        {
            _value1 = value;
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Value1"));
        }
    }

    private double _value2;
    public double Value2
    {
        get { return _value2; }
        set
        {
            _value2 = value;
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Value2"));
        }
    }

    public double _result;



    public double Result
    {
        get { return _result; }
        set
        {
            _result = value;
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Result"));
        }
    }
}
